#include "line.h"
#include "picturereceiver.h"

line::line() {}

line::line(int x, int y, float distance)
{
    this->start=x;
    this->final=y;
    this->distance=distance;
}

bool line::isLine(int x, int y)
{
    if((this->start==x&&this->final==y))return 1;
    else return 0;
}


int line::findLine(line* l, int length,int x, int y)
{
    for(int i = 1;i <= length;i++){
        if((l+i-1)->isLine(x,y)){
            return i-1;
        }
    }
    return -1;
}
